package demo.container;

import demo.container.models.Student;

import java.util.HashMap;
import java.util.Map;

public class HashMapTest {
    public static void main(String[] args) {
        Map<Student, Float> scores = new HashMap<>();
        Student studentA = new Student("李彦博", 23);
        Student studentB = new Student("王伟忠", 24);
        scores.put(studentA, 98f);
        scores.put(studentB, 87.5f);
        Student studentC = new Student("李彦博", 23);
        System.out.println(studentC.getName() + "的成绩是: " + scores.get(studentC));
    }
}